package com.hs.mapper;

import com.hs.entity.Reply;
import com.hs.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    //增
    int addUser(User user);
    //删
    int deleteUser(int id);
    //改
    int updateUser(User user);
    //查
    User getUserById(int id);
    //分页查询
    List<User> getUserByPage();
    //登录
    User getUserByLogin(@Param("account") String account ,@Param("password") String password);
    //修改密码
    int updateUserGai(User user);
    User selectById(long id);
    User getUserByPhone(@Param("phone") String phone);
    //
    User selectUser(Integer id);
    //
    User findUserById(int uid);
    // 更新用户积分
    int updatePointsById(@Param("uid") int id,@Param("point") int point);
    //使用id查询心理答疑回复和心理问题
    List<Reply>findReplyById(int id);
    List<Reply> findReplyByPage();
}
